import request from '@/utils/request'

// 查询工资核算列表
export function listSalaryData(query) {
  return request({
    url: '/hrm/salaryData/list',
    method: 'get',
    params: query
  })
}

// 工资条
export function mySalary(query) {
    return request({
        url: '/hrm/salaryData/mySalary',
        method: 'get',
        params: query
    })
}

// 员工年度汇总
export function stuffList() {
    return request({
        url: '/hrm/salaryData/stuffs',
        method: 'get',
    })
}


// 查询工资核算详细
export function getSalaryData(id) {
  return request({
    url: '/hrm/salaryData/' + id,
    method: 'get'
  })
}

// 新增工资核算
export function addSalaryData(data) {
  return request({
    url: '/hrm/salaryData',
    method: 'post',
    data: data
  })
}

// 修改工资核算
export function updateSalaryData(data) {
  return request({
    url: '/hrm/salaryData',
    method: 'put',
    data: data
  })
}

// 删除工资核算
export function delSalaryData(id) {
  return request({
    url: '/hrm/salaryData/' + id,
    method: 'delete'
  })
}


//查询是否需要初始化
export function getMaxMonth(){
    return request({
        url: '/hrm/salaryData/getMaxMonth',
        method: 'get',
    })
}


export function calcData(data){
    return request({
        url: '/hrm/salaryData/calcData',
        method: 'post',
        data: data
    })
}
